package com.kolakcc.loljclient.model;

import com.gvaneyck.rtmp.TypedObject;

public class PlayerChampionSelection {
	public TypedObject internalTypedObject;
	public int spell1ID;
	public int spell2ID;
	public int championID;
	public int selectedSkinIndex;
	public int dataVersion;
	public String summonerInternalName;
	public int modeledAfterDataVersion = 0;
	public Object futureData;
	
	public PlayerChampionSelection(TypedObject to) {
		internalTypedObject = to;
		spell1ID = to.getInt("spell1Id");
		spell2ID = to.getInt("spell2Id");
		championID = to.getInt("championId");
		selectedSkinIndex = to.getInt("selectedSkinIndex");
		summonerInternalName = to.getString("summonerInternalName");
		dataVersion = to.getInt("dataVersion");
		
		if (this.modeledAfterDataVersion != this.dataVersion) {
			System.out.println("The version of this data does not match the version that is modelled. ("
							+ this.internalTypedObject.type + ")");
			System.out.println(this.internalTypedObject);
		}
	}

	@Override
	public String toString() {
		return "PlayerChampionSelection [internalTypedObject="
				+ internalTypedObject + ", spell1ID=" + spell1ID
				+ ", spell2ID=" + spell2ID + ", championID=" + championID
				+ ", selectedSkinIndex=" + selectedSkinIndex + ", dataVersion="
				+ dataVersion + ", summonerInternalName="
				+ summonerInternalName + ", modeledAfterDataVersion="
				+ modeledAfterDataVersion + ", futureData=" + futureData + "]";
	}
}
